﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dude.MLS
{
    public static class Extensions
    {
        /// <summary>
        /// Use Dude.MLS.Lang.GetText() to translate this string into selected language
        /// </summary>
        /// <returns>Translated string in current language</returns>
        public static string GetText(this string s)
        {
            return Lang.GetText(s);
        }

        /// <param name="args">Arguments for format function</param>
        public static string GetText(this string s, params string[] args)
        {
            return Lang.GetText(s, args);
        }

        /// <summary>
        /// Get localized text from localization module
        /// </summary>
        /// <param name="module">module name</param>
        /// <returns></returns>
        public static string GetModuleText(this string s, string module)
        {
            return Lang.GetModuleText(module, s);
        }

        /// <param name="args">format arguments</param>
        public static string GetModuleText(this string s, string module, params string[] args)
        {
            return Lang.GetModuleText(module, s, args);
        }
    }
}
